package com.xy.job.core.enums

enum class ScriptType(
    var exe: String,
    var suffix: String,
) {
    CMD(
        exe = "cmd",
        suffix = ".bat",
    ),
    BASH(
        exe = "shell",
        suffix = ".sh",
    ),
    PYTHON(
        exe = "python",
        suffix = ".py",
    ),
    POWER_SHELL(
        exe = "pwsh",
        suffix = ".ps1",
    ),
    ;

    companion object {
        fun findByName(name: String?) = entries.find { it.name == name }
    }
}